package com.xiaobawang.knowledge.spider.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * @description 业务异常
 * @author 18101119
 * @date 2024/3/27 9:41
 * @email songxinhang2023@e-chinalife.com
 * @id 18101119
 * @phone 13001321080
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
public class BusinessException extends RuntimeException implements Serializable {
    private static final long serialVersionUID = 844707266283632150L;
    private String errMsg;
    private Integer errCode;

    public BusinessException(String errMsg) {
        this.errMsg = errMsg;
    }

    public BusinessException(Integer errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }
}
